import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
//引入全局守卫
import "./router/permission.js"

import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
//添加小图标
import "./iconfont/iconfont.css";
import "./iconfont/font/iconfont.css";

// 引入echarts
import * as echarts from 'echarts';
/*import echarts from 'echarts'*/
//引入i18n
import  VueI18n from 'vue-i18n';


//将 echarts 挂载到 vue的根节点
Vue.prototype.$echarts = echarts

Vue.use(ElementUI);
Vue.use(VueI18n);
//创建i18n实例
const i18n = new VueI18n({
  locale: store.getters.locale,
  messages: {
    "zh":require('./lang/zh'),
    "en":require('./lang/en'),
  }
})


Vue.config.productionTip = false

new Vue({
  i18n,
  router,
  store,
  render: h => h(App)
}).$mount('#app')
